package cn.eeepay.framework.dao.workOrder;

import cn.eeepay.framework.model.workOrder.WorkWarningRecordEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectKey;

/**
 * 工单预警记录表
 *
 * @author quanhz
 * @email
 * @date 2020-08-20 09:01:59
 */

public interface WorkWarningRecordDao {

    @Insert("INSERT INTO `work_warning_record`( `work_product_type`, `agent_no`, `warning_number`, `warning_title`, `warning_content`," +
            " `warning_number_config`, `pop_status`, `create_time`, `operator`) " +
            "VALUES (#{info.workProductType}, #{info.agentNo}, #{info.warningNumber}, #{info.warningTitle}, #{info.warningContent}," +
            " #{info.warningNumberConfig}, #{info.popStatus}, now(), #{info.operator})")
    @SelectKey(statement = "select LAST_INSERT_ID()", keyProperty = "info.id", before = false, resultType = Long.class)
    Long save(@Param("info") WorkWarningRecordEntity info);
}
